library(RWeka);
print("Processing Info.txt... ")
info<-read.table("data/Info.txt");
names(info)=c("class","img-finding-id","study-finding-id","img-id","study-id","breast","img-type","X","Y","X-nipple","Y-nipple")
info["class"][info["class"]==-1]="benign";
info["class"][info["class"]==1]="malignant";
info["breast"][info["breast"]==1]="left";
info["breast"][info["breast"]==0]="right";
info["img-type"][info["img-type"]==1]="mlo";
info["img-type"][info["img-type"]==0]="cc";

info = transform(info, `class`=as.factor(`class`), `breast`=as.factor(`breast`), `img-type`=as.factor(`img-type`))
write.arff(x=info, file="data/info.arff");

print("Done. Ready to load files.")

